#ifndef UTILS_H
#define UTILS_H

#include <stdlib.h>
#include <vector>

class Point3D
{
    public:
        double x, y, z;
        void* vertex;
        bool isMidpoint;
        
		Point3D();
        Point3D(double x, double y, double z);
        ~Point3D();
        
        Point3D operator*(const double& scalar);
        Point3D operator+(const Point3D& param);
};

class Vector3D
{
	public:
		double x, y, z;

		Vector3D();
        Vector3D(double x, double y, double z);
        ~Vector3D();

		double length();
};

struct Line3D
{
    public:
        Point3D* start;
        Point3D* end;
};

class BSplineSnapshot
{
    public:
        double u;
	std::vector<Line3D*>* lines;
        
        BSplineSnapshot();
        ~BSplineSnapshot();

	void setU(double u);
	void initializeSpace(int numElements);
	void initFromPoints(const std::vector<Point3D>& points);
};

#endif
